package jackson;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import com.fasterxml.jackson.annotation.JsonProperty;

public class Customer{
	
	private Integer id;
	@JsonProperty(value="cname")
	private String name;
	@JsonFormat(pattern="yyyy-MM-dd")
	private Date birth;
	@JsonIgnore
	private Double sal;
//	@JsonManagedReference
	private Address address;
	
	public Customer(){
		super();
	}

	public Customer(Integer id, String name, Date birth, Double sal,
			Address address) {
		super();
		this.id = id;
		this.name = name;
		this.birth = birth;
		this.sal = sal;
		this.address = address;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getBirth() {
		return birth;
	}

	public void setBirth(Date birth) {
		this.birth = birth;
	}

	public Double getSal() {
		return sal;
	}

	public void setSal(Double sal) {
		this.sal = sal;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	
	

}
